<template>
	<!--
    	作者：1550495493@qq.com
    	时间：2019-07-30
    	描述：新增资源
    -->
    <div class="NewResources">
    	<div class="IssuedNotice-box">
        <form id="curriculumForm">
          <input name="id" type="hidden" :value="curriculum.id"/>
          <div class="search-boxs">
            <label>课程名称：</label>
            <input name="name" class="search-box" type="text" placeholder="请输入课程名称" v-model="curriculum.name"/>
            <span class="error"></span>
          </div>
          <div class="search-boxs">
            <label class="textarea-label">课程简介：</label>
            <textarea name="introduction" class="textarea" v-model="curriculum.introduction"></textarea>
            <span class="error"></span>
          </div>
          <div class="search-boxs">
            <label class="textarea-label">课件链接：</label>
            <input name="courseware" class="search-box" type="text" placeholder="请输入课件链接" v-model="curriculum.courseware"/>
            <span class="error"></span>
          </div>
          <!--<div class="search-boxs imgbox">
            <label>课程视频：</label>
            <input name="courseware" type="hidden" v-model="curriculum.courseware"/>
            <input type="file" id="IdFront" accept=".doc,.docx,.xls,.xlsx,.pdf,.html,.txt,image/jpeg,image/tif,image/gif,image/png,image/bmp,.mp3,.mp4,.wav,.flv,.avi" @change="idFront($event)" style="display: none;" />
            <input type="button" value="上传课件" class="delete write" @click="Input(1)"/>
            <input type="button" value="删除课件" class="delete write" @click="deleteEnclosure(1)"/>
            <ul class="img-box">
              <li v-for="item in FileUpload">{{item}}</li>
            </ul>
          </div>-->
          <div class="search-boxs imgbox">
            <label>课程附件：</label>
            <input type="button" value="上传课件" class="delete write" @click="touchOffIdInput(1)"/>
            <input type="button" value="删除课件" class="delete write" @click="deleteEnclosure(2)" v-if="FileUploads.length"/>
            <input name="enclosure" type="hidden" v-model="curriculum.enclosure" @change="clearEnclosureMsgX($event)"/>
            <span class="error" v-show="curriculum.enclosure == null || curriculum.enclosure == ''"></span>
            <input type="file" id="handIdFront" multiple @change="idFrontImg($event)" accept=".txt,.rar,.zip,.doc,.docx,.xls,.xlsx,.ppt,.pptx,.pdf,.exe,image/*" style="display: none;" />
           <ul class="img-box">
              <li v-for="item in FileUploads">{{item}}</li>
            </ul>
          </div>
          <input class="save fl" type="button" value="保存" v-if="curriculum.id == null" @click="saveData"/>
          <input class="save fl" type="button" value="更新" v-else @click="updateData"/>
        </form>
        <!--<label class="error" v-if="!FileUploads.length&&uploadEnclosure">请上传课程附件</label>-->
      </div>
    </div>
</template>
<script src="./NewResources.js"></script>

<style scoped>
	@import "NewResources.css"
</style>
